package labilabyrinth.activity;

import labilabyrinth.game.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MenuActivity extends Activity{
	
	private Intent intent;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu_layout);
        this.setTitle("Menu");
    }
	
    public void startNewGame(View v){
    	intent = new Intent(this, LevelChooserActivity.class);
    	startActivity(intent);
    }
    
    public void startLevelEditor(View v){
    	intent = new Intent(this, LevelNameActivity.class);
    	startActivity(intent);
    }
    
    public void showAboutGame(View v){
  	   AlertDialog ad = new AlertDialog.Builder(this).create();  
  	   ad.setCancelable(false); 
  	   ad.setMessage(this.getResources().getText(R.string.how_to_play_help));  
  	   ad.setButton("OK", new DialogInterface.OnClickListener() {  
  	       public void onClick(DialogInterface dialog, int which) {  
  	           dialog.dismiss();                      
  	       }  
  	   });  
  	   ad.show(); 
    }
    
    public void closeGame(View v)
    {
    	this.finish();
    }

}
